namespace Naruto.CQRS.Command;

public abstract class BaseCommand<TEvent> : ICommand<TEvent> where TEvent : ICommandEvent
{
    public abstract Task HandleAsync(TEvent eEvent, CancellationToken cancellationToken);

    public async Task HandleAsync(object eEvent, CancellationToken cancellationToken)
    {
        await HandleAsync((TEvent) eEvent, cancellationToken);
    }
}